@()(implicit request: RequestHeader)
@admin.main("密码修改")("detailInfo") {
	<style>
			.icon2x {
				width: 24px;
				font-size: 20px;
				min-width: 24px;
				display: inline-block;
			}

	</style>


	<div class="page-content">

		<div class="page-bar">
			<ul class="page-breadcrumb">
				<li>
					<i class="fa fa fa-user"></i>
					<a href="@routes.AdminController.detailInfoBefore">账户信息</a>
					<i class="fa fa-angle-right"></i>
				</li>
				<li>
					<a href="#">密码修改</a>
				</li>
			</ul>
		</div>


		<div class="row-fluid">
			<div class="row">
				<div class="col-md-12 col-sm-12">
					<div class="portlet blue-madison box">
						<div class="portlet-title">
							<div class="caption">
								密码修改
							</div>
						</div>

						<div class="portlet-body">

							<form id="form" class=" form-horizontal" accept-charset="UTF-8"
							action="@routes.AdminController.changePassword" autocomplete="off" method="post" style="margin-top: 30px;">

								<span class="@request.flash.get("class")" style="line-height: 35px;" id="error">@request.flash.get("info")
								</span>

								<div class="form-group">
									<label class="control-label col-sm-2">旧密码:</label>
									<div class="col-sm-3">
										<div class="input-group">
											<span class="input-group-addon"><em
											class="fa fa-key icon2x"></em></span>
											<input id="loginPassword" name="password" placeholder="旧密码" type="password" autofocus="autofocus" class="form-control" required value="" maxlength="30"/>
										</div>
									</div>
								</div>

								<div class="form-group">
									<label class="control-label col-sm-2">新密码:</label>
									<div class="col-sm-3">
										<div class="input-group">
											<span class="input-group-addon"><em
											class="fa fa-key icon2x"></em></span>
											<input id="loginPassword" name="newPassword" placeholder="新密码" type="password"
											required class="form-control" maxlength="30"/>
										</div>
									</div>
								</div>

								<div class="form-group">
									<label class="control-label col-sm-2">再次确认新密码:</label>
									<div class="col-sm-3">
										<div class="input-group">
											<span class="input-group-addon"><em
											class="fa fa-key icon2x"></em></span>
											<input id="loginPassword" name="newPasswordAgain" placeholder="再次确认新密码" type="password" class="form-control" maxlength="30"/>
										</div>
									</div>
								</div>

								<div class="form-group">
									<div class="actions col-sm-offset-2 col-sm-2">
										<button type="submit" class="btn btn-primary" style="width: 90%;" id="search" >
											确认修改</button>
									</div>
								</div>

							</form>


						</div>
					</div>
				</div>
			</div>


		</div>

	</div>

	<script>
			$(function () {

				bootstrapValidator()

			})

			function bootstrapValidator() {
				$('#form').bootstrapValidator({
					framework: 'bootstrap',
					icon: {
						valid: 'glyphicon glyphicon-ok',
						invalid: 'glyphicon glyphicon-remove',
						validating: 'glyphicon glyphicon-refresh'
					},
					fields: {
						password: {
							validators: {
								notEmpty: {
									message: "密码不能为空！"
								}
							}
						},
						newPassword: {
							validators: {
								notEmpty: {
									message: "新密码不能为空！"
								},
								identical: {
									field: 'newPasswordAgain',
									message: '两次密码不一样!'
								},
							}
						},
						newPasswordAgain: {
							validators: {
								identical: {
									field: 'newPassword',
									message: '两次密码不一样!'
								},
								notEmpty: {
									message: "确认密码不能为空！"
								}
							}
						}
					}

				});
			}


	</script>

}
